<script setup lang="ts">
import { PanelLeftOpen } from 'lucide-vue-next';
import { useSidebar } from '@/components/ui/sidebar';
import UserSetting from './user-setting.vue';

const { state, toggleSidebar } = useSidebar();
</script>

<template>
  <SidebarFooter>
    <UserSetting />

    <SidebarMenu v-if="state === 'collapsed'">
      <SidebarMenuItem @click="toggleSidebar">
        <SidebarMenuButton as-child>
          <PanelLeftOpen class="size-4 cursor-pointer" />
        </SidebarMenuButton>
      </SidebarMenuItem>
    </SidebarMenu>
  </SidebarFooter>
</template>
